package com.work.blog.mapper;

import com.work.blog.model.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:DELL
 * Date:2025-06-16
 * Time:16:53
 */
@Mapper
public interface UserInfoMapper {
    //根据用户名，查询用户信息
    @Select("select * from user where delete_flag =0 and user_name = #{userName}")
    UserInfo selectByName(String userName);

    //根据用户id，查询用户信息
    @Select("select * from user where delete_flag =0 and id = #{id}")
    UserInfo selectById(Integer id);
}
